#ifndef LINEEDITGAME_H
#define LINEEDITGAME_H

#include <QLineEdit>

#include <QTimer>

#include "games/basegame.h"

// LineEditGame: digit the correct string on the edit line
class LineEditGame : public BaseGame
{
    Q_OBJECT
public:
    // Constructor
    explicit LineEditGame(QWidget *parent = 0, int difflvl = 1);

    // Members
    bool isSolved() { if(lineedit->text() == string) return true; return false; }
    QString hint() { counter++; return string.left(counter < string.length() ? counter : string.length()); }
public slots:
    void timerTimeout();

private:
    QLineEdit * lineedit;

    QTimer * timer;

    QString string;

    int counter;
};

#endif // LINEEDITGAME_H
